﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Service sv = new Service();

        if (sv.GetDataTable("select * from taikhoan where tentk='" + txtTenTK.Text + "' AND matkhau='" + txtMatKhau.Text + "'").Rows.Count == 1)
        {
            Session["tentk"] = txtTenTK.Text;
            Response.Redirect("admin.aspx");
        }
        else
        {
            Response.Write("User or pass not found!");
        }
    }
}